using UnityEngine;

public class EnemyState_XiaoGuaGua_站立 : EnemyStateBase_XiaoGuaGua
{
	private float _MaxTimer;

	private float _MaxTimer2;

	public override void OnEnter()
	{
		_Mono._Ani.Play("站立");
		_Mono._Rb2D.velocity = Vector2.zero;
		_MaxTimer = 0.3f + Random.value * 2.5f;
		_MaxTimer2 = Random.Range(0.25f, 0.45f);
		_Timer = 0f;
	}

	public override void OnExit()
	{
	}

	public override void OnUpdate()
	{
		_Timer += Time.deltaTime;
		if (_Mono._Is追击中 && _Timer >= _MaxTimer2)
		{
			_Mono.ChangeState(StateType_Enemy_XiaoGuai.追击);
		}
		if (_Timer >= _MaxTimer)
		{
			_Mono.ChangeState(StateType_Enemy_XiaoGuai.散步);
		}
	}
}
